<!DOCTYPE html>
<html lang="">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <link id="setIcon" rel="icon" :href="href" />
  <!-- <title>中电充换</title> -->

  <link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css" />
  <script src="https://cache.amap.com/lbs/static/es5.min.js"></script>

  <script
    src="https://webapi.amap.com/maps?v=1.4.8&key=28c8e7abcbf39798c42548038e097819&plugin=AMap.MouseTool&plugin=AMap.Geocoder"></script>

  <!-- -百度地图 -->
  <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=PU924Omqzi2NhOClcTdNfd0HWOBPPQ1d"></script>
  <script>
    document.addEventListener('mousewheel', function (e) {
      e = e || window.event;
      if ((e.wheelDelta && event.ctrlKey) || e.detail) {
        event.preventDefault();
      }
    }, {
      capture: false,
      passive: false
    });
    window.onload = function () {
      document.addEventListener('touchstart', function (e) {
        console.log("1", e.touches.length)
        if (e.touches.length > 1) {
          e.preventDefault()
        }
      })
      document.addEventListener('gesturestart', function (e) {
        console.log("2")
        e.preventDefault()
      })
    }
    document.documentElement.addEventListener(
      "touchstart",
      function (event) {
        if (event.touches.length > 1) {
          event.preventDefault();
        }
      },
      { passive: false }
    );
    // 禁止双击放大
    let lastTouchEnd = 0;
    document.documentElement.addEventListener(
      "touchend",
      function (event) {
        var now = Date.now();
        if (now - lastTouchEnd <= 300) {
          event.preventDefault();
        }
        lastTouchEnd = now;
      },
      { passive: false }
    );
    //阻止双指放大页面
    document.documentElement.addEventListener("gesturestart",
      function (event) {
        event.preventDefault();
      })
  </script>
</head>

<script>
  $(document).ready(function ($) {
    document.title = '柜子测试工具'
    document.getElementById('setIcon').href = './img/logoIcon.png'
  })
</script>

<body>
  <noscript>
    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
        Please enable it to continue.</strong>
  </noscript>
  <div id="app"></div>
  <!-- built files will be auto injected -->
</body>

</html>